<template>
	<view>
		<view class="header" v-bind:class="{'status':isH5Plus}">
			<view class="userinfo">
				<view class="face">
					<image :src="userinfo.face"></image>
				</view>
				<view class="info">
					<view class="username">{{userinfo.username}}</view>
					<view class="integral">{{userinfo.integral}}</view>
					<view class="Certification">{{userinfo.Certification}}</view>
				</view>
			</view>
			<view class="setting">
				<image src="../../static/myCenter/signIn.png"></image>
				<text>签到</text>
			</view>
		</view>
		<view class="header-btm">
			<view class="btm-item" v-for="item in userNav" :key="item.name">
				<view class="btm-num">{{item.amount}}</view>
				<view class="btm-text">{{item.name}}</view>
			</view>
		</view>
		<view class="orders">
			<view class="box">
				<view class="boxHeader">
					<view class="boxTtitle">
						我的资产
						<image src="../../static/myCenter/myMoney.png"></image>
					</view>
					<view class="boxSub">权益保障可升级></i></view>
				</view>
				<view class="boxMain">
					<view class="boxMainItem" style="border-right: 2px solid #fbfbfb;" @click="myAsset">
						<view class="itemHeader">总资产</view>
						<view class="itemMess">0.00</view>
						<view class="itemHint">昨日收益0.00</view>
					</view>
					<view class="boxMainItem">
						<view class="itemHeader">总待还</view>
						<view class="itemMess">0.00</view>
						<view class="itemHint">暂无待还款项</view>
					</view>
				</view>
				<view class="myMoneyNav">
					<view class="myMoneyItem" v-for="item in myMoney" :key="item.name">
						<view class="myMoneyBox">{{item.name}}</view>
						<view class="myMoneyMess">{{item.mess}}</view>
					</view>
				</view>
			</view>
		</view>

		<view class="tui-box">
			<view class="tui-cell-header">
				<view class="tui-cell-title">专属权益</view>
			</view>
			<view class="tui-order-list">
				<view class="tui-tool-item" v-for="item in jurisdiction" :key='item.name'>
					<view class="tui-icon-box">
						<image :src="item.icon" class="tui-tool-icon"></image>
					</view>
					<view class="tui-tool-text">{{item.name}}</view>
				</view>
			</view>
		</view>

		<view class="list">
			<view class="list-header">
				<view class="list-title">我的服务</view>
			</view>
			<view class="ul">
				<view class="li" v-for="(li,li_i) in severList" hover-class="hover" :key="li.name">
					<image :src="li.icon"></image>
					<view class="text">{{li.name}}</view>
					<i class="cuIcon-right"></i>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				//#ifdef APP-PLUS
				isH5Plus: true,
				//#endif
				//#ifndef APP-PLUS
				isH5Plus: false,
				//#endif
				userinfo: {
					face: '../../static/myCenter/userPrtrait.png',
					username: "Hi,翔瑞用户",
					integral: "理财达人",
					Certification: "未实名>"
				},
				severList: [{
						name: '实名认证',
						icon: '../../static/myCenter/realName.png'
					},
					{
						name: '安全服务',
						icon: '../../static/myCenter/security.png'
					},
					{
						name: '信用评价',
						icon: '../../static/myCenter/credit.png'
					},
					{
						name: '隐私设置',
						icon: '../../static/myCenter/privacy.png'
					},
					{
						name: '辅助功能',
						icon: '../../static/myCenter/auxiliary.png'
					},
					{
						name: '帮助反馈',
						icon: '../../static/myCenter/help.png'
					},
					{
						name: '关于',
						icon: '../../static/myCenter/regard.png'
					}
				],
				userNav: [{
						name: '我的积分',
						amount: '0'
					},
					{
						name: '我的账单',
						amount: '0'
					},
					{
						name: '权益包',
						amount: '0'
					},
					{
						name: '银行卡',
						amount: '0'
					}
				],
				myMoney: [{
						name: '白条额度',
						mess: '充话费减20'
					},
					{
						name: '可借现金',
						mess: '最高20万'
					},
					{
						name: '我的保险',
						mess: '0项'
					},
					{
						name: '我的订单',
						mess: '暂无交易'
					}
				],
				jurisdiction: [{
						name: '理财体验金',
						icon: '../../static/myCenter/moneyMan.png'
					},
					{
						name: '医疗急救卡',
						icon: '../../static/myCenter/medicalTrea.png'
					},
					{
						name: '天天有奖',
						icon: '../../static/myCenter/award.png'
					},
					{
						name: '我的客服',
						icon: '../../static/myCenter/service.png'
					}
				]
			}
		},
		onLoad() {},
		methods: {
			myAsset() {
				uni.navigateTo({
					url: '/pages/asset/asset'
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
		position: relative;
	}

	.header {
		&.status {
			padding-top: var(--status-bar-height);
		}

		background-color:#3476f1;
		height:30vw;
		padding-left: 4%;
		display:flex;
		align-items:center;

		.userinfo {
			width: 90%;
			display: flex;

			.face {
				flex-shrink: 0;
				width: 110upx;
				height: 110upx;

				image {
					width: 100%;
					height: 100%;
					border-radius: 100%
				}
			}

			.info {
				display: flex;
				flex-flow: wrap;
				padding-left: 20upx;

				.username {
					width: 100%;
					color: #fff;
					font-size: 40upx;
					font-weight: 500;
				}

				.integral {
					padding: 0 20upx;
					height: 40upx;
					line-height: 35upx;
					color: #fff;
					border: 2px solid #ffffff;
					border-radius: 20upx;
					font-size: 20upx;
					margin: 16upx 20upx 0 0;
				}

				.Certification {
					padding: 0 20upx;
					height: 40upx;
					line-height: 35upx;
					color: #fff;
					border: 2px solid #ffffff;
					border-radius: 20upx;
					font-size: 20upx;
					margin: 16upx 0 0 0;
				}
			}
		}

		.setting {
			background-color: #ffc364;
			flex-shrink: 0;
			padding: 10upx 20upx 10upx 30upx;
			display: flex;
			align-items: center;
			border-top-left-radius: 50upx;
			border-bottom-left-radius: 50upx;

			image {
				width: 25upx;
				height: 30upx;
				margin-right: 10upx;
			}

			text {
				font-size: 24upx;
				color: #f85656;
			}
		}
	}

	.hover {
		background-color: #eee
	}

	.header-btm {
		width: 100%;
		padding: 20upx 30upx 250upx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
		color: #fff;
		background-color: #3476f1;
		border-radius: 0 0 100% 100%;

		.btm-item {
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;

			.btm-num {
				font-size: 50upx;
				font-weight: bold;
				position: relative;
			}

			.btm-text {
				font-size: 24upx;
				opacity: 0.85;
				padding-top: 10upx;
			}
		}
	}

	.orders {
		position: relative;
		margin-bottom: 300upx;

		.box {
			width: 94vw;
			margin: 0 auto;
			background-color: #fefefe;
			border-radius: 24upx;
			box-shadow: 0 0 20upx rgba(0, 0, 0, 0.1);
			position: absolute;
			top: -200upx;
			left: 3vw;

			.boxHeader {
				width: 100%;
				padding: 30upx;
				box-sizing: border-box;
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 2px solid #fbfbfb;

				.boxTtitle {
					font-size: 32upx;
					font-weight: 600;
					color: #333333;
					display: flex;
					align-items: center;

					image {
						width: 40upx;
						height: 30upx;
						margin-left: 10upx;
					}
				}

				.boxSub {
					font-size: 24upx;
					color: #e2bc7f;
				}
			}

			.boxMain {
				display: flex;
				justify-content: space-around;

				.boxMainItem {
					width: 35vw;
					margin: 30upx 0 30upx 0;

					.itemHeader {
						font-size: 24upx;
						color: #333333;
					}

					.itemMess {
						font-size: 40upx;
						color: #333333;
						font-weight: bold;
						margin-top: 14upx;
					}

					.itemHint {
						font-size: 24upx;
						color: #999999;
						margin-top: 30upx;
					}
				}
			}

			.myMoneyNav {
				display: flex;
				justify-content: space-around;
				border-top: 2px solid #fbfbfb;

				.myMoneyItem {
					display: flex;
					flex-direction: column;
					margin: 40upx 0 40upx 0;

					.myMoneyBox {
						font-size: 24upx;
						color: #333333;
					}

					.myMoneyMess {
						margin-top: 12upx;
						font-size: 24upx;
						color: #999999;
					}
				}
			}
		}
	}

	.tui-box {
		width: 94vw;
		margin: 0 auto;
		padding-top: 30upx;

		.tui-cell-header {
			height: 40upx;
			padding: 0 10upx;
			box-sizing: border-box;
			border-left: 5px solid #3476f1;

			.tui-cell-title {
				font-size: 32upx;
				line-height: 40upx;
				font-weight: 600;
				color: #333333;
			}

			.tui-cell-sub {
				font-size: 26upx;
				font-weight: 400;
				color: #999;
				padding-right: 28upx;
			}
		}

		.tui-order-list {
			margin: 30upx auto;
			background-color: #fefefe;
			border-radius: 24upx;
			box-shadow: 0 0 20upx rgba(0, 0, 0, 0.1);
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.tui-tool-item {
				width: 25%;
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: column;
				padding: 30upx 0 30upx 0;

				.tui-icon-box {
					.tui-tool-icon {
						width: 84upx;
						height: 84upx;
						display: block;
					}

					.tui-badge-icon {
						width: 66upx;
						height: 30upx;
						position: absolute;
						right: 0;
						transform: translateX(88%);
						top: -15upx;
					}

				}

				.tui-tool-text {
					font-size: 26upx;
					font-weight: 400;
					color: #666;
					padding-top: 4upx;
				}
			}
		}
	}

	.list {
		width: 93vw;
		margin: 40upx auto;

		.list-header {
			width: 90vw;
			height: 40upx;
			padding: 0 10upx;
			box-sizing: border-box;
			margin: 0 auto 30upx;
			border-left: 5px solid #3476f1;

			.list-title {
				font-size: 32upx;
				line-height: 40upx;
				font-weight: 600;
				color: #333333;
			}
		}

		.ul {
			background-color: #fefefe;
			border-radius: 24upx;
			box-shadow: 0 0 20upx rgba(0, 0, 0, 0.1);

			.li {
				height: 100upx;
				padding: 0 30upx;
				border-bottom: solid 1upx #f8f8f8;
				display: flex;
				align-items: center;

				image {
					width: 30upx;
					height: 30upx;
				}

				.text {
					padding-left: 20upx;
					width: 100%;
					color: #333333;
					font-size: 30upx;
				}

				.to {
					flex-shrink: 0;
					width: 40upx;
					height: 40upx
				}
			}
		}

	}
</style>
